<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/css/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/css/themes/icon.css"/>">
<script type="text/javascript" src="<c:url value="/js/jquery.min.js"/>"></script>

<script type="text/javascript"
	src="<c:url value="/js/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/easyui-lang-zh_CN.js"/>"></script>
<title>住院记录</title>
<style type="text/css">
.cc_item {
	padding: 10px;
}
</style>
</head>
<body>
<script type="text/javascript" src="<c:url value="/js/fusioncharts.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/fusioncharts.charts.js"/>"></script>

<script type="text/javascript" src="<c:url value="/js/fusioncharts.theme.fint.js"/>"></script>
<script type="text/javascript">
	$(function(){
		$('#cc_casehistory_search').searchbox({
		    searcher:function(value,name){
		    	if(name=="病人姓名"){
		    		$("#cc_casehistory_datagrid").datagrid({
			    		url:'ccto_queryByCcCasrhistoryqueryBypname',
			    		queryParams: {
			    			pname: value
			    		}
			    	});
		    	}
		    }
		});
		$("#cc_casehistory_rel").linkbutton({
			onClick:function(){
				$("#cc_casehistory_datagrid").datagrid("reload");
			}
		});
		$("#cc_casehistorydel").linkbutton({
			onClick:function(){
				$.messager.confirm("提示", "确定要删除吗？", function(v){
					if(v){
						
						var rows =$("#cc_casehistory_datagrid").datagrid("getSelections");
						//获取所有选中的编号
						var arr = [];
						var cal_jg=false;
						for(var i = 0; i < rows.length; i ++){
							arr.push(rows[i].casehistory);
						}
						//用form提交
						$('<form>').form('submit', {
						    url:'ccto_delCcCasrhistory',
						    onSubmit: function(param){
						    	param.list=arr;
						    },
						    success:function(data){
						    	var json = eval("(" + data + ")");
								$.messager.alert("提示", json.reason);
								$("#cc_casehistory_datagrid").datagrid("reload");
						    }
						});
					}
				});
			}
		});
	});
	       
</script>
<div style="height:50%">
<table  id="cc_casehistory_datagrid" class="easyui-datagrid"
		data-options="
				fitColumns:true,
				fit:true,
				rownumbers: true,
			    url: 'ccto_queryByAllCcCasrhistory',
				border:false ,
				pagination:true,
				striped:true,
				toolbar: '#cc_casehistorybtn',
				pageSize: 6,
				pageList:[6,12,24,48]
			">
		<thead>
			<tr>
				<th data-options="field:'casehistory', width:'5%',checkbox:true">出院编号</th>
				<th data-options="field:'pid', width:'15%'">住院编号</th>
				<th data-options="field:'pname', width:'12%'">姓名</th>
				<th data-options="field:'psex', width:'8%'">性别</th>
				<th data-options="field:'oname', width:'11%'">科室</th>
				<th data-options="field:'wname', width:'11%'">病房</th>
				<th data-options="field:'admissiondate', width:'20%'">入院时间</th>
				<th data-options="field:'outdate', width:'20%'">出院时间</th>
				
			</tr>
		</thead>
	</table>
	</div>
	<div id="cc_casehistorybtn">
		<a id="cc_casehistorydel" class="easyui-linkbutton" 
			data-options="iconCls:'icon-remove',plain:true">删除记录</a>
		 <a id="cc_casehistory_rel" class="easyui-linkbutton"
			data-options="iconCls:'icon-reload',plain:true">刷新</a> 
		<input id="cc_casehistory_search" class="easyui-searchbox"
			data-options="menu:'#cc_casehistoryee',width:220,prompt:'请输入你要查找的内容'">
	</div>
	<div id="cc_casehistoryee" style=" width:90px">
		<div date-options="name:'name'">病人姓名</div>
	</div>
<table style="margin: 0px;padding:0px; background-color: #ffffff;width : 100%;">
	
	<tr>
		<td><div id="show_tongji"></div></td>
		<td><div id="show_tongjiBy"></div></td>
	</tr>
</table>
	
	<script type="text/javascript">
		 var cc_revenueChart8= new FusionCharts({
			"type" : "column3d",
			"renderAt" : "show_tongji",
			"width" : "400px",
			"height" : "44%",
			"dataFormat" : "xmlurl",
			"dataSource" : "cc_toshowtongji"

		});
		cc_revenueChart8.render();
		var cc_revenueChart9= new FusionCharts({
			"type" : "column3d",
			"renderAt" : "show_tongjiBy",
			"width" : "400px",
			"height" : "44%",
			"dataFormat" : "xmlurl",
			"dataSource" : "cc_totongjiByadmissiondate"

		});
		cc_revenueChart9.render(); 
</script>
</body>
</html>